package com.zhiyou.springcloud.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.springcloud.bean.classes;
import com.zhiyou.springcloud.bean.leave;
import com.zhiyou.springcloud.bean.teachers;
import com.zhiyou.springcloud.dao.leaveMapper;
import com.zhiyou.springcloud.service.LeaveService;
@Service
public class LeaveServiceImpl implements LeaveService {
	@Autowired
	leaveMapper leaveMapper;
	
	@Override
	public List<leave> getLeavesByConditions(Integer lid, String cname, String lreason, Integer approval) {
		return leaveMapper.getLeavesByConditions(lid, cname, lreason, approval);
	}

	@Override
	public int updateLeave(Integer lid) {
		
		return leaveMapper.updateLeave(lid);
	}

	@Override
	public int noPassLeave(Integer lid, String nopassreason) {
		return leaveMapper.noPassLeave(lid, nopassreason);
	}

	@Override
	public List<classes> selectCnameByTid(Integer tid) {
		return leaveMapper.selectCnameByTid(tid);
	}

	@Override
	public List<teachers> getAllTeachers() {
		return leaveMapper.getAllTeachers();
	}

	@Override
	public int addLeave(leave leave) {
		return leaveMapper.addLeave(leave);
	}

	
}
